<?php
/**
 * Created by PhpStorm.
 * User: haobin
 * Date: 2016/10/13
 * Time: 17:13
 */
require_once("conn.php");
require_once("functions.php");
//判断是否有支付的openid，如果有就跳转到登录页面logoff.php
//如果没有就跳到提示页面focus.php
$uid = $_GET['id'];
$user = $mysql->query("select * from `user` WHERE `id`={$uid}");
if(!$user[0]['password']){
    echo "<script>alert('请您先设置一个提现密码');</script>";
    echo "<script>location.href='./setpassword.php?id={$uid}'</script>";
}
if($user[0]['wxpay']){
    echo "<script>location.href='./logoff.php?id={$uid}'</script>";
}else{
    echo "<script>alert('请到公众号绑定后提现');</script>";
    echo "<script>location.href='./choose.php?id={$uid}'</script>";
}